using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace SMS.Common.Entities
{
    public class Stocktaking
    {
        private string stk_id;
        [XmlElement("StocktakingId",Order=1)]
        public string Stk_ID
        {
            get { return stk_id; }
            set { stk_id = value; }
        }
        private string storeId;
        [XmlElement("StoreId",Order=4)]
        public string StoreID
        {
            get { return storeId; }
            set { storeId = value; }
        }

        private string storeName;
        [XmlIgnore]
        public string StoreName
        {
            get { return storeName; }
            set { storeName = value; }
        }

        private string stocktakingDate;
        [XmlElement("StocktakingDate",Order=2)]
        public string StocktakingDate
        {
            get { return stocktakingDate; }
            set { stocktakingDate = value; }
        }

        private string stocktakingType;
        [XmlElement("StocktakingType",Order=3)]
        public string StocktakingType
        {
            get { return stocktakingType; }
            set { stocktakingType = value; }
        }

        private string desc;
        [XmlElement("Description",Order=5)]
        public string Description
        {
            get { return desc; }
            set { desc = value; }
        }

        private string editor;
        [XmlIgnore]
        public string Editor
        {
            get { return editor; }
            set { editor = value; }
        }

        private DateTime editDate;
        [XmlIgnore]
        public DateTime EditDate
        {
            get { return editDate; }
            set { editDate = value; }
        }

        private string status;
        [XmlIgnore]
        public string Status
        {
            get { return status; }
            set { status = value; }
        }

        private List<StocktakingDetail> stocktakingDetailList;
        [XmlArray("Items",Order=6),XmlArrayItem("Item")]
        public List<StocktakingDetail> StocktakingDetailList
        {
            get { return stocktakingDetailList; }
            set { stocktakingDetailList=value; }
        }

        public Stocktaking() { }
        public Stocktaking(string stk_id,string storeId, string storeName, string stocktakingDate, string stocktakingType, string desc, string editor, DateTime editDate, string status, List<StocktakingDetail> stocktakingDetailList)
        {
            this.stk_id = stk_id;
            this.storeId = storeId;
            this.storeName = storeName;
            this.stocktakingDate = stocktakingDate;
            this.stocktakingType = stocktakingType;
            this.desc = desc;
            this.editor = editor;
            this.editDate = editDate;
            this.status = status;
            this.stocktakingDetailList = stocktakingDetailList;
        }
        public Stocktaking(string storeId, string storeName, string stocktakingDate, string stocktakingType, string desc, string editor, DateTime editDate, string status, List<StocktakingDetail> stocktakingDetailList)
        {
            this.storeId = storeId;
            this.storeName = storeName;
            this.stocktakingDate = stocktakingDate;
            this.stocktakingType = stocktakingType;
            this.desc = desc;
            this.editor = editor;
            this.editDate = editDate;
            this.status = status;
            this.stocktakingDetailList = stocktakingDetailList;
        }
        public Stocktaking(string stk_id,string storeId, string storeName, string stocktakingDate, string stocktakingType, string desc, string editor, DateTime editDate, string status)
        {
            this.stk_id = stk_id;
            this.storeId = storeId;
            this.storeName = storeName;
            this.stocktakingDate = stocktakingDate;
            this.stocktakingType = stocktakingType;
            this.desc = desc;
            this.editor = editor;
            this.editDate = editDate;
            this.status = status;
        }
    }
    public class Stocktakings
    {
        [XmlElement("Stocktaking")]
        public Stocktaking[] stocktakings;
    }
}
